perm filename REPORT.TEX[WEB,ALS] blob sn#653584 filedate 1982-04-14 generic text, type T, neo UTF8
	Modifications to WEAVE.WEB and TANGLE.WEB   April 14, 1982

The following changes were made to WEAVE.WEB to meet known objections.
So far, I have no assurance that procedure sizes have been reduced enough
to meet the 8k restriction on IBM compatable computers, but I believe that
they have.  The fixed programs weave and tangle themselves and each other
without any noticed error.

Module 137. This case statement was split by creating a new sub-procedure
called six_cases that is in a new module 162, taking those cases that
could most easily be split off. This divided the number of lines of code
almost exactly into two equal parts.  This procedure contains cases for:

	alpha: @<Cases for |alpha|@>;
	beginning: @<Cases for |beginning|@>;
	intro: @<Cases for |intro|@>;
	open: @<Cases for |open|@>;
	math: @<Cases for |math|@>;
	simp: @<Cases for |simp|@>;

Module 174 (which was 172). This case statement was also split with the
new sub-procedure called easy_cases that is in a new module 173.  This
split was based on the degree of complexity of the cases and the division
is almost exactly into two equal number of the lines of code.
This procedure contains cases for:

	string: @<Append a string scrap@>;
	set_element_sign: sc3("\")("i")("n")(math);
	double_dot: sc3("\")("t")("o")(math);
	"#","$","%","↑": sc2("\")(next_control)(math);
	ignore,"|",xref_roman,xref_wildcard,xref_typewriter: do_nothing;
	"(","[": sc1(next_control)(open);
	")","]": sc1(next_control)(close);
	"*": sc4("\")("a")("s")("t")(math);
	",": sc3(",")(opt)("9")(math);
	".","0","1","2","3","4","5","6","7","8","9": sc1(next_control)(simp);
	";": sc1(";")(semi);
	":": sc1(":")(colon);
	@t\4@>  @<Cases involving nonstandard ascii characters@>@;
	exponent: sc3("\")("E")("{")(exp);
	begin_comment: sc2("\")("B")(math);
	end_comment: sc2("\")("T")(math);
	octal: sc2("\")("O")(simp);
	thin_space: sc2("\")(",")(math);
	math_break: sc2(opt)("0")(simp);
	line_break: comment_scrap(force);
	big_line_break: comment_scrap(big_force);
	no_line_break: begin app(big_cancel); app("\"); app(" ");
		comment_scrap(big_cancel);
		end;
	pseudo_semi: sc0(semi);
	join: sc2("\")("J")(math);
	othercases sc1(next_control)(math)

Module 242 (which was 240). This was modified by defining two new
procedures PhseI and PhseII that contain the code for the first two
phases. Module 241 contains these procedures.

	@p procedure Phse_I;
	begin @<Phase I:...@>; end;

	procedure Phse_II;
	begin @<Phase II:...@>; end;

	 - - - - - - - - - - - - - -
A few additional minor fixes.

I put in some 6 or 8 @'s before semicolons in WEAVE, to eliminate some 123
unneeded semicolons in the pascal output.  I fixed the print routine to
list module_count instead of asterisks, shortened a number of lines,
changed the version number of my copy (on WEB.ALS) to 0.9 and ran this
WEAVE on itself with the results as noted below.  This has been run
through TEX and no troubles could be detected. I have a hard copy of the
output for your inspection if you wish to see it.

The changes were to modified module 98 and 207 and a corresponding module
in WEAVE.CH to get the program to print(module_count:0,',').

Here are the results:

WEBFILE    : weave.web
CHANGEFILE : weave.ch
TEXFILE    : weave.tex
This is WEAVE, Version 0.9
1,9,17,27,34,49,57,59,64,84,96,109,120,127,132,172,186,204,221,238,241,244,
Writing the output file...1,9,17,27,34,49,57,59,64,84,96,109,120,127,132,172,186,204
,221,238,241,244,
Writing the index...Done.
Memory usage statistics: 1574 names, 2977 cross references, 16270 bytes;
parsing required 939 scraps, 1810 texts, 4081 tokens, 119 levels;
sorting required 34 levels.

A similar change was made in TANGLE.WEB, this time to module 130 to
print(module_count:0,',') on input and to module 93 to type
 .....500.....1000.....1500..etc. on output.
.